<?php
$idNewsSup=$_GET['idNewsSup'];
echo "Etes-vous certains de vouloir supprimer cette newsletter.<br>";
$recupVNews=mysql_query("SELECT * FROM infos_news WHERE idNews='$idNewsSup'") or die(mysql_error());
$dataV=mysql_fetch_assoc($recupVNews);
$NomNews=$dataV['NomNews'];
	$JourNews=$dataV['JourNews'];
	$MoisNews=$dataV['MoisNews'];
	$AnneeNews=$dataV['AnneeNews'];
	echo "<div class='sup'><strong>".$NomNews."</strong> ".$JourNews."/".$MoisNews."/".$AnneeNews."</div>";
	?>
	<div class="ValidSup"><a href="index.php?page=webmaster&idNewsSup=<?php echo $idNewsSup; ?>&Sup=ok" style="color:#FF0000;">OUI</a> <a href="index.php?page=webmaster">NON</a></div>
	<?php
	echo "<br><font style='color:#920303; font-weight:bold;'>ATTENTION, LA SUPPRESSION D'UNE NEWSLETTER <br>ENTRAINE LA PERTE DE SES STATISTIQUES</font>";

if(isset($_GET['idNewsSup']) && isset($_GET['Sup'])){
$idNewsSupOk=$_GET['idNewsSup'];
	$supNews=mysql_query("DELETE FROM `infos_news` WHERE idNews='$idNewsSupOk'") or die(mysql_error());
	$StatSup="stat_".$idNewsSupOk;
	$dropStat=mysql_query("DROP TABLE `$StatSup`") or die(mysql_error());
	echo "<script language=\"JavaScript\">
<!-- 
document.location=\"index.php?page=webmaster\"; 

//-->
</script>";
}
?>